<%-- 
    Document   : applicant_insert
    Created on : Feb 12, 2012, 3:50:08 AM
    Author     : SonLT
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico" />
        <link rel="stylesheet" type="text/css" href="./css/webstarter.css" media="screen" />
        <link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.17.custom.css" />
        <link rel="stylesheet" type="text/css" href="./css/superfish.css" />
        <link rel="stylesheet" type="text/css" href="./css/jquery.wysiwyg.css" />
        <link rel="stylesheet" type="text/css" href="./css/fullcalendar.css" />
        <style type="text/css">
            input[type="text"]{border: 1px solid #aaaaaa; height: 21px;}
            input[type="text"]:focus{background: #ffc;}
            input[type="password"]{border: 1px solid #aaaaaa; height: 21px;}
            input[type="password"]:focus{background: #ffc;}
        </style>

        <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.17.custom.min.js"></script>
        <script type="text/javascript" src="js/additional-methods.js"></script>
        <script type="text/javascript" src="js/jquery.validate.js"></script>

        <script type="text/javascript">

            $(document).ready(function(){
                $("#txtDatecreate").datepicker();
            });

            $(function() {

                $("#insert").validate({
                    rules:{
                        txtapplicantID: {
                            required:true
                        },
                        txtUsername: {
                            required:true
                        },
                        txtPassword: {
                            required:true
                        },
                        txtapplicantName: {
                            required:true
                        },
                        txtapplicantPhone: {
                            required:true,
                            digits:true
                        },
                        txtapplicantEmail: {
                            required:true,
                            email:true
                        },
                        txtapplicantAbout: {
                            required:true
                        },
                        txtDatecreate: {
                            required:true
                        },
                        txtStatus:{
                            required:true
                        }
                    }
                })

            });

        </script>
    </head>
    <body>
        <jsp:include page="include/header.jsp"/>
        <div id="content">

            <div class="dataGrid">

                <div id="testForm" title="Create new user" style="margin-left: 200px; margin-top: 30px;">
                    <!--  <p class="validateTips" style="width: 300px; text-align: left;">All form fields are required.</p>-->
                    <html:form styleId="insert" action="administrator/applicantInsert.do" method="post">
                        <fieldset style="width: 400px; text-align: left;">
                            <legend style="margin-bottom: 15px; font-size: 12px; font-weight: bolder;">Create new applicant</legend>
                            ApplicantID:<br> 
                            <input type="text" name="txtapplicantID" value="<%="A"+utility.GenerateString.randomString()%>" readonly style="width: 200px; margin-bottom: 20px; background-color: #aaaaaa;"/><br>
                            Username:<br>
                            <input type="text" name="txtUsername" style="width: 200px; margin-bottom: 20px;"/><br>
                            Password:<br>
                            <input type="password" name="txtPassword" style="width: 200px; margin-bottom: 20px;"/><br>
                            Applicant Name:<br>
                            <input type="text" name="txtapplicantName" style="width: 200px; margin-bottom: 20px;"/><br>
                            Applicant Phone:<br>
                            <input type="text" name="txtapplicantPhone" style="width: 200px; margin-bottom: 20px;"/><br>
                            Applicant Email:<br>
                            <input type="text" name="txtapplicantEmail" style="width: 200px; margin-bottom: 20px;"/><br>
                            Applicant About:<br>
                            <input type="text" name="txtapplicantAbout" value="" id="txtStartdate" style="width: 200px; margin-bottom: 20px;"/><br>
                            Date Created:<br>
                            <input type="text" name="txtDatecreate" id="txtDatecreate" value="" style="width: 200px; margin-bottom: 20px;"/><br>
                            Status:<br>
                            <select name="txtStatus" disabled>
                                <option value="Not Inprocess">Not InProcess</option>
                                <option value="InProcess">InProcess</option>
                                <option value="Hired">Hired</option>
                                <option value="Banned">Banned</option>
                            </select><br/><br>
                            
                            <input type="submit" id="submit" name="submit" value="Insert"/>
                            <input type="reset" id="reset" name="reset" value="Clear"/>
                        </fieldset>

                    </html:form>
                </div>



            </div>

        </div><!-- END OF #content -->
        <jsp:include page="include/footer.jsp"/>
    </body>
</html>


